package com.cee.service.Impl;

import com.cee.dao.ExamCompletionMapper;
import com.cee.model.ExamCompletion;
import com.cee.service.ExamCompletionService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;


@Slf4j
@Service
@Transactional
public class ExamCompletionServiceImpl implements ExamCompletionService {

    @Autowired
    private ExamCompletionMapper examCompletionMapper;

    @Override
    public int deleteExamCompletionById(Integer id) {
        return examCompletionMapper.deleteById(id);
    }

    @Override
    public int saveExamCompletion(ExamCompletion examCompletion) {
        return examCompletionMapper.insert(examCompletion);
    }

    @Override
    public List<ExamCompletion> getListByExamId(Integer examId) {
        return examCompletionMapper.getListByExamId(examId);
    }

    @Override
    public void updateExamCompletion(ExamCompletion examCompletion) {
        examCompletionMapper.updateExamCompletion(examCompletion);
    }
}
